app.controller('registerCtrl',['$scope',function($scope){
    $scope.userEntity = {
        username:'',
        password:'',
        password2:''
    };

    $scope.register = function(){
        console.log($scope.userEntity);
    }
}]);